package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 会员等级表
 * </p>
 *
 * @author xiangnick
 * @since 2018-01-12
 */
@TableName("shop_member_level")
public class MemberLevel extends Model<MemberLevel> {

    private static final long serialVersionUID = 1L;

    /**
     * 会员等级ID
     */
	@TableId(value = "id",type = IdType.INPUT)
	private String id;
    /**
     * 商户id
     */
	@TableField("shop_id")
	private String shopId;
    /**
     * 会员等级
     */
	@TableField("member_level")
	private Integer memberLevel;
    /**
     * 会员等级名称
     */
	@TableField("member_name")
	private String memberName;
    /**
     * 默认折扣
     */
	@TableField("default_discount")
	private Integer defaultDiscount;
    /**
     * 默认积分倍数
     */
	@TableField("default_point")
	private Integer defaultPoint;
    /**
     * 1=true(启用)0=false(禁用)
     */
	private Integer status;


	public String getStatusDisplay() {
		return status == 0?"禁用":"启用";
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getShopId() {
		return shopId;
	}

	public void setShopId(String shopId) {
		this.shopId = shopId;
	}

	public Integer getMemberLevel() {
		return memberLevel;
	}

	public void setMemberLevel(Integer memberLevel) {
		this.memberLevel = memberLevel;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public Integer getDefaultDiscount() {
		return defaultDiscount;
	}

	public void setDefaultDiscount(Integer defaultDiscount) {
		this.defaultDiscount = defaultDiscount;
	}

	public Integer getDefaultPoint() {
		return defaultPoint;
	}

	public void setDefaultPoint(Integer defaultPoint) {
		this.defaultPoint = defaultPoint;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "MemberLevel{" +
			"id=" + id +
			", shopId=" + shopId +
			", memberLevel=" + memberLevel +
			", memberName=" + memberName +
			", defaultDiscount=" + defaultDiscount +
			", defaultPoint=" + defaultPoint +
			", status=" + status +
			"}";
	}
}
